/* 
 * General helping methods
 */


PC-rules:
	
	sendAll( [], _, _ ) <- true | { skip }
	sendAll( [Receiver | Rest], Performative, Message ) <- true |
	{
		if B(Message = newMatchForItem( Item, Seller ) ) then { 
			send( Receiver, Performative, newMatchForItem( Item, Seller ) )
		};
		
		
		if B(Message = removedOffer( Item, Seller ) ) then {
			send( Receiver, Performative, removedOffer( Item, Seller ) )
		};
		
		if B(Message = sellersForItem( Item, Sellers ) ) then {
			send( Receiver, Performative, sellersForItem( Item, Sellers ) )
		};
		
		if B(Message = auctionBid( Item, Bid ) ) then {
			send( Receiver, Performative, auctionBid( Item, Bid ) ) 
		};
	
		if B( Rest = [] ) then { skip } else {	sendAll( Rest, Performative, Message ) }
	}
	

	
	wait( 0 ) <- true | skip
	wait( Steps ) <- true | { wait( Steps -1 ) }


	
	 